# Contributor: Leon Marz <lmarz@cs.uni-frankfurt.de>
# Maintainer: Leon Marz <lmarz@cs.uni-frankfurt.de>
pkgname=radare2-cutter
pkgver=1.10.3
pkgrel=0
pkgdesc="Reverse Engineering Platform powered by radare2"
url="https://cutter.re"
arch="all !armhf !mips64" # limited by syntax-highlighting
license="GPL-3.0-only"
depends="radare2"
makedepends="cmake libzip-dev zlib-dev python3-dev radare2-dev qt5-qtsvg-dev
	     capstone-dev syntax-highlighting-dev graphviz-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/radareorg/cutter/archive/v$pkgver.tar.gz"
builddir="$srcdir/cutter-$pkgver"
options="!check" # upstream does not provide a testsuite

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCUTTER_ENABLE_PYTHON=ON \
		src/
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="8bee19ad5cc4304c52907247ac508bb10d1bf8251a0c75f96c01dbe918327f18ee0e76f831feca0c115134e08025fc9b79dc1d8e3e01925d4d2c960c8c67336d  radare2-cutter-1.10.3.tar.gz"
